(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 7.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[     14770,        394]
NotebookOptionsPosition[     14277,        375]
NotebookOutlinePosition[     14623,        390]
CellTagsIndexPosition[     14580,        387]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell["\<\
This first command is optional.  It will speed up the beachball plotting by \
decreasing the resolution on the balls.\
\>", "Text",
 CellChangeTimes->{{3.5927645936058426`*^9, 3.5927646022258544`*^9}, 
   3.5950202416776795`*^9, {3.595021171106996*^9, 3.5950212033295403`*^9}},
 FontFamily->"Times New Roman",
 FontSize->14,
 FontColor->RGBColor[1, 0, 0]],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"PolyListForBB", "=", 
    RowBox[{"BasicPolys", "[", 
     RowBox[{
      RowBox[{"Range", "[", 
       RowBox[{"0.", ",", "360", ",", "10"}], "]"}], ",", 
      RowBox[{"Range", "[", 
       RowBox[{"0.", ",", "90", ",", "10"}], "]"}]}], "]"}]}], ";"}], 
  "  "}]], "Input",
 CellChangeTimes->{{3.5950212069995456`*^9, 3.595021212169553*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"eye", "=", 
    RowBox[{"10.", 
     RowBox[{"xyztp", "[", 
      RowBox[{"{", 
       RowBox[{"20", ",", "70"}], "}"}], "]"}]}]}], ";"}], "  ", 
  RowBox[{"(*", " ", 
   StyleBox[
    RowBox[{
     RowBox[{"20", " ", "is", " ", "azimuth", " ", "of", " ", "eye"}], ",", 
     " ", 
     RowBox[{"70", " ", "is", " ", "colatitude", " ", "of", " ", "eye"}]}],
    FontColor->RGBColor[1, 0, 0]], " ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[CapitalLambda]list", "=", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"2", ",", "1", ",", "0"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"2", ",", "1", ",", 
        RowBox[{"-", "3"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"2", ",", "2", ",", 
        RowBox[{"-", "1"}]}], "}"}]}], " ", "}"}]}], ";"}], " ", 
  RowBox[{"(*", " ", 
   StyleBox[
    RowBox[{
     RowBox[{
      RowBox[{"your", " ", "eigenvalue", " ", "triples"}], ";", " ", 
      RowBox[{"you", " ", 
       RowBox[{"specify", ".", " ", "You"}], " ", "can", " ", "read", " ", 
       "them", " ", "in", " ", "from", " ", "a", " ", "data", " ", 
       RowBox[{"file", ".", " ", "They"}], " ", "do", " ", "not", " ", "have",
        " ", "to", " ", "be", " ", "normalized"}]}], ",", " ", 
     RowBox[{
     "but", " ", "they", " ", "have", " ", "to", " ", "be", " ", "ordered", 
      " ", "if", " ", "you", " ", "want", " ", "them", " ", "on", " ", "the", 
      " ", "lune"}]}],
    FontColor->RGBColor[1, 0, 0]], 
   StyleBox[" ",
    FontColor->RGBColor[1, 0, 0]], 
   StyleBox[
    RowBox[{
     StyleBox["*",
      FontColor->RGBColor[1, 0, 0]], ")"}]]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"ExtraPts", "=", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"1", ",", "0", ",", 
        RowBox[{"-", "1"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"1", ",", "1", ",", 
        RowBox[{"-", "2"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"2", ",", 
        RowBox[{"-", "1"}], ",", 
        RowBox[{"-", "1"}]}], "}"}]}], "}"}]}], ";"}], "  ", 
  RowBox[{"(*", " ", 
   StyleBox[
    RowBox[{
     RowBox[{"other", " ", "points"}], ",", " ", 
     RowBox[{
      RowBox[{"in", " ", "\[CapitalLambda]", " ", "coordinates"}], ";", " ", 
      RowBox[{"you", " ", 
       RowBox[{"specify", ".", " ", "They"}], " ", "do", " ", "not", " ", 
       "have", " ", "to", " ", "be", " ", 
       RowBox[{"normalized", "."}]}]}]}],
    FontColor->RGBColor[1, 0, 0]], 
   StyleBox[" ",
    FontColor->RGBColor[1, 0, 0]], 
   StyleBox[
    RowBox[{
     StyleBox["*",
      FontColor->RGBColor[1, 0, 0]], ")"}]]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantUVWaxes", "=", "False"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Want\[CapitalLambda]axes", "=", "False"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantGrid", "=", "False"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantZeroLam1Lam3", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantDeviatoricArc", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantLuneBoundary", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[Nu]List", "=", 
    RowBox[{"{", 
     RowBox[{"0", ",", 
      RowBox[{"1", "/", "4"}]}], "}"}]}], ";"}], "   ", 
  RowBox[{"(*", " ", 
   StyleBox[
    RowBox[{
     RowBox[{"specifies", " ", "the", " ", "Poisson", " ", "contours"}], ";", 
     " ", 
     RowBox[{
      RowBox[{"make", " ", "\[Nu]List"}], " ", "=", " ", 
      RowBox[{
       RowBox[{"(", ")"}], " ", "if", " ", "you", " ", "do", " ", "not", " ", 
       "want", " ", 
       RowBox[{"any", "."}]}]}]}],
    FontColor->RGBColor[1, 0, 0]], " ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"tkns", "=", ".006"}], ";", 
   RowBox[{"ptsz", "=", ".02"}], ";", 
   RowBox[{"ArrowScale", "=", ".055"}], ";"}], "  ", 
  RowBox[{"(*", " ", 
   StyleBox[
    RowBox[{
    "ptsz", " ", "is", " ", "point", " ", "size", " ", "for", " ", "the", " ",
      "eigenvalue", " ", "triples"}],
    FontColor->RGBColor[1, 0, 0]], " ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{"Lune", "[", 
  RowBox[{
  "\[CapitalLambda]list", ",", "ExtraPts", ",", "eye", ",", 
   "Want\[CapitalLambda]axes", ",", "WantUVWaxes", ",", "WantGrid", ",", 
   "WantZeroLam1Lam3", ",", "WantDeviatoricArc", ",", "WantLuneBoundary", ",",
    "\[Nu]List"}], "]"}]}], "Input",
 CellChangeTimes->{{3.592687640827312*^9, 3.5926877062774024`*^9}, {
   3.5926879330997167`*^9, 3.592687939259725*^9}, {3.592688055429886*^9, 
   3.5926880555798855`*^9}, {3.5926880881199303`*^9, 
   3.5926880882599306`*^9}, {3.5926882609491715`*^9, 
   3.5926882826492014`*^9}, {3.5927068103145504`*^9, 3.592706833564583*^9}, {
   3.592706884124653*^9, 3.592706909516689*^9}, {3.5927069510217466`*^9, 
   3.592706959431758*^9}, {3.5927074491939383`*^9, 3.5927074525339427`*^9}, {
   3.5927081032758465`*^9, 3.5927081325483866`*^9}, {3.5927094177721777`*^9, 
   3.592709447692219*^9}, {3.592709509412304*^9, 3.592709525342326*^9}, {
   3.5927615570861063`*^9, 3.59276155975611*^9}, {3.5927618118009605`*^9, 
   3.592761817800969*^9}, {3.592762323749674*^9, 3.5927623291796813`*^9}, {
   3.592762941292535*^9, 3.592762953305052*^9}, {3.5927632724144955`*^9, 
   3.592763374106637*^9}, {3.5927634163086967`*^9, 3.5927634236087065`*^9}, {
   3.592763478506283*^9, 3.5927635372988644`*^9}, {3.592763614502475*^9, 
   3.5927636539100294`*^9}, 3.592763703615098*^9, {3.5927637629191823`*^9, 
   3.592763773709197*^9}, {3.5927640659501066`*^9, 3.592764095092647*^9}, {
   3.594587454019518*^9, 3.594587478499552*^9}, {3.5945875300096235`*^9, 
   3.594587584702199*^9}, {3.59458763517177*^9, 3.594587646831786*^9}, {
   3.594587693208353*^9, 3.5945877293584023`*^9}, {3.5945878073160105`*^9, 
   3.5945878238160334`*^9}, {3.594589845480216*^9, 3.5945898503902225`*^9}, {
   3.5950184864027305`*^9, 3.595018512746769*^9}, {3.595019818043092*^9, 
   3.5950198227430983`*^9}, {3.595019907903216*^9, 3.5950199107132196`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"eye", "=", 
   RowBox[{"10.", 
    RowBox[{"xyztp", "[", 
     RowBox[{"{", 
      RowBox[{"35", ",", "70"}], "}"}], "]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"\[CapitalLambda]list", "=", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"1", ",", "0", ",", 
       RowBox[{"-", "1"}]}], "}"}], ",", 
     RowBox[{"\[CapitalLambda]of\[Beta]\[Gamma]", "[", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"100", "Degree"}], ",", 
        RowBox[{"10", "Degree"}]}], "}"}], "]"}]}], "}"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ExtraPts", "=", 
   RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantUVWaxes", "=", "False"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Want\[CapitalLambda]axes", "=", "False"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantGrid", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantZeroLam1Lam3", "=", "False"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantDeviatoricArc", "=", "False"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantLuneBoundary", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[Nu]List", "=", 
    RowBox[{"{", "}"}]}], ";"}], " "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ptsz", "=", ".015"}], ";", 
  RowBox[{"BBrad", "=", ".22"}], ";", 
  RowBox[{"SpokeLength", "=", "2.2"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"Show", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"Lune", "[", 
      RowBox[{
      "\[CapitalLambda]list", ",", "ExtraPts", ",", "eye", ",", 
       "Want\[CapitalLambda]axes", ",", "WantUVWaxes", ",", "WantGrid", ",", 
       "WantZeroLam1Lam3", ",", "WantDeviatoricArc", ",", "WantLuneBoundary", 
       ",", "\[Nu]List"}], "]"}], ",", 
     RowBox[{"Graphics3D", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"BeachballOnSphereForLamU", "[", 
         RowBox[{
         "#", ",", "id", ",", "BBrad", ",", "SpokeLength", ",", "eye"}], 
         "]"}], "&"}], "/@", "\[CapitalLambda]list"}], "]"}]}], "}"}], ",", 
   RowBox[{"ViewPoint", "\[Rule]", "eye"}]}], "]"}]}], "Input",
 CellChangeTimes->{{3.595015789444954*^9, 3.5950158319950123`*^9}, {
   3.595016117801411*^9, 3.5950161267414236`*^9}, {3.5950183361245184`*^9, 
   3.5950183401345234`*^9}, {3.595019615980812*^9, 3.5950196346608377`*^9}, {
   3.5950196681108837`*^9, 3.5950197294809685`*^9}, 3.595019799793067*^9, {
   3.5950198395531216`*^9, 3.595019871373165*^9}, {3.595020016365367*^9, 
   3.595020117367508*^9}}],

Cell["Experiment with the inputs :", "Text",
 CellChangeTimes->{{3.5927645936058426`*^9, 3.5927646022258544`*^9}, 
   3.5950202416776795`*^9},
 FontFamily->"Times New Roman",
 FontSize->14,
 FontColor->RGBColor[1, 0, 0]],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"eye", "=", 
    RowBox[{"10.", 
     RowBox[{"xyztp", "[", 
      RowBox[{"{", 
       RowBox[{"20", ",", "70"}], "}"}], "]"}]}]}], ";"}], 
  "  "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[CapitalLambda]list", "=", 
    RowBox[{"Table", "[", 
     RowBox[{
      RowBox[{"\[CapitalLambda]of\[Beta]\[Gamma]", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"60", "Degree"}], ",", "\[Gamma]"}], "}"}], "]"}], ",", 
      RowBox[{"{", 
       RowBox[{"\[Gamma]", ",", "0.", ",", 
        RowBox[{"20", "Degree"}], ",", 
        RowBox[{"5", "Degree"}]}], "}"}]}], "]"}]}], ";"}], 
  " "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"ExtraPts", "=", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"1", ",", "0", ",", 
        RowBox[{"-", "1"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"1", ",", "1", ",", 
        RowBox[{"-", "2"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"2", ",", 
        RowBox[{"-", "1"}], ",", 
        RowBox[{"-", "1"}]}], "}"}]}], "}"}]}], ";"}], 
  " "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantUVWaxes", "=", "False"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Want\[CapitalLambda]axes", "=", "True"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantGrid", "=", "False"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantZeroLam1Lam3", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantDeviatoricArc", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WantLuneBoundary", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"\[Nu]List", "=", 
    RowBox[{"{", "0", "}"}]}], ";"}], "   ", 
  RowBox[{"(*", " ", 
   StyleBox[
    RowBox[{"\[Nu]", " ", "=", " ", 
     RowBox[{
      RowBox[{"0", " ", "contour", " ", "is", " ", "\[Lambda]2"}], " ", "=", 
      " ", "0"}]}],
    FontColor->RGBColor[1, 0, 0]], " ", "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"tkns", "=", ".006"}], ";", 
   RowBox[{"ptsz", "=", ".015"}], ";", 
   RowBox[{"ArrowScale", "=", ".055"}], ";"}], "  "}], "\[IndentingNewLine]", 
 RowBox[{"Lune", "[", 
  RowBox[{
  "\[CapitalLambda]list", ",", "ExtraPts", ",", "eye", ",", 
   "Want\[CapitalLambda]axes", ",", "WantUVWaxes", ",", "WantGrid", ",", 
   "WantZeroLam1Lam3", ",", "WantDeviatoricArc", ",", "WantLuneBoundary", ",",
    "\[Nu]List"}], "]"}]}], "Input",
 CellChangeTimes->{{3.592764213769314*^9, 3.5927643025994363`*^9}, {
  3.5927643423569913`*^9, 3.592764343666993*^9}, {3.59458745540952*^9, 
  3.594587456779522*^9}, {3.5945875310396247`*^9, 3.594587532039626*^9}, {
  3.594587569102177*^9, 3.5945875713221807`*^9}, {3.5945876370817723`*^9, 
  3.5945876394317756`*^9}, {3.5945876946083546`*^9, 3.5945877238883953`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"WantUVWaxes", "=", "True"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Want\[CapitalLambda]axes", "=", "False"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"Lune", "[", 
  RowBox[{
  "\[CapitalLambda]list", ",", "ExtraPts", ",", "eye", ",", 
   "Want\[CapitalLambda]axes", ",", "WantUVWaxes", ",", "WantGrid", ",", 
   "WantZeroLam1Lam3", ",", "WantDeviatoricArc", ",", "WantLuneBoundary", ",",
    "\[Nu]List"}], "]"}]}], "Input",
 CellChangeTimes->{{3.592688364659315*^9, 3.592688372639326*^9}, {
   3.5926886722197466`*^9, 3.592688672639747*^9}, {3.592688771299883*^9, 
   3.5926887716198835`*^9}, {3.5927069718337765`*^9, 
   3.5927070053738227`*^9}, {3.5927083462931843`*^9, 3.592708456235836*^9}, 
   3.592709541932349*^9, 3.592709633774477*^9, {3.5927096937265606`*^9, 
   3.592709694586562*^9}, 3.5927642039968*^9, {3.5927643886290565`*^9, 
   3.5927644061490808`*^9}, {3.5945874618995295`*^9, 3.594587464739533*^9}, {
   3.594587533199628*^9, 3.5945875342696295`*^9}, 3.594587572162182*^9, 
   3.5945876407317777`*^9, {3.594587696258357*^9, 3.594587724628396*^9}, {
   3.5945898950302844`*^9, 3.594589896920287*^9}}]
},
WindowSize->{1303, 803},
WindowMargins->{{260, Automatic}, {40, Automatic}},
FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (January 30, 2009)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[545, 20, 365, 8, 30, "Text"],
Cell[913, 30, 390, 11, 31, "Input"],
Cell[1306, 43, 6115, 150, 272, "Input"],
Cell[7424, 195, 2602, 68, 272, "Input"],
Cell[10029, 265, 220, 5, 30, "Text"],
Cell[10252, 272, 2846, 78, 252, "Input"],
Cell[13101, 352, 1172, 21, 72, "Input"]
}
]
*)

(* End of internal cache information *)
